import axios from 'axios'

const baseUrl = 'http://127.0.0.1:8081'

export default function readCard () {
  return new Promise((resolve, reject) => {
    axios({
      baseURL: baseUrl,
      method: 'post',
      url: '/readcard',
      data: {}
    }).then(res => {
      if (res.status === 200) {
        resolve(res.data)
      }
    }).catch(err => {
      reject(err)
    })
  })
}
